home *** CD-ROM | disk | FTP | other *** search
/ Educational Software Cooperative 4 / Educational Software Cooperative 4.iso / dc / dc.doc < prev    next >
Text File  |  1995-04-01  |  90KB  |  1,825 lines

  1.                               DC CIRCUIT ANALYSIS
  2.                             Version 1.4, March 1995
  3.                       Copyright 1991-1995, Arthur Tanzella
  4.                               All Rights Reserved
  5.  
  6. The "DC Circuit Analysis" program is an educational tool for introducing
  7. the user to the concepts of Direct Current (DC) circuits in general, and
  8. digital computer circuits in particular.  Circuits are created and
  9. evaluated on the computer screen.  This program is not intended to be a
  10. design tool, and as such does not properly handle some analog circuits,
  11. such as operational amplifiers.  This documentation can function as a
  12. tutorial to learn about semiconductors, logic, and digital computer
  13. circuits.  Numerous sample circuits are used throughout this documentation
  14. and can be displayed and evaluated using this program.
  15.  
  16. ACKNOWLEDGEMENTS
  17.  
  18. I would like to take this opportunity to thank the following people who are
  19. my good friends, and have contributed significantly to this program.  Their
  20. contributions were in the testing of the program and in their suggestions
  21. to make this program and this documentation easier to use and read.
  22.  
  23.                 Warren Cella
  24.                 Ken Hanawalt
  25.                 Art Silverstein 
  26.                 Mike Weisfield
  27.                 Bill Locke
  28.  
  29. I would also like to thank Bill Locke for contributing subroutines to solve
  30. a matrix of simultaneous equations.
  31.  
  32. LICENSE AGREEMENT
  33.  
  34. DC Circuit Analysis is a "Shareware Program" and is provided at no charge
  35. to the user for a one week evaluation period.  Feel free to share it with
  36. your friends, but please do not give it away altered or as part of another
  37. system.  The essence of "user-supported" software is to provide personal
  38. computer users with quality software without high prices, and yet to
  39. provide incentive for programmers to continue to develop new products.  If
  40. you find this program useful and continue to use the program after the one
  41. week evaluation period, you are requested to send a registration payment of
  42. $15 (US) to:
  43.  
  44.                 Arthur Tanzella
  45.                 4613 Clubvue Drive
  46.                 Pittsburgh, PA 15236-4803
  47.                 USA
  48.  
  49. Print out and fill in the "REGISTER.DOC" file.  Send it with the $15 (US)
  50. registration fee to the above address to register this program.
  51.  
  52. The $15 (US) registration fee will license one copy for use on any one
  53. computer at any one time.  You must treat this software just like a book. 
  54. An example is that this software may be used by any number of people and
  55. may be freely moved from one computer location to another, while there is
  56. no possibility of it being used at one location while it's being used at
  57. another.  Treat the software just like a book that cannot be read by two
  58. people in two different locations simultaneously.
  59.  
  60. Users of DC Circuit Analysis must accept this disclaimer of warranty: "DC
  61. Circuit Analysis is supplied as is.  The author disclaims all warranties,
  62. expressed or implied, including, without limitation, the warranties of
  63. merchantability and of fitness for any purpose. The author assumes no
  64. liability for damages, direct or consequential, which may result from the
  65. use of DC Circuit Analysis."
  66.  
  67. Commercial users of DC Circuit Analysis must register and pay for their
  68. copies of DC Circuit Analysis within 30 days of first use or their license
  69. is withdrawn.  Site-License arrangements may be made by contacting Arthur
  70. Tanzella at the above address.
  71.  
  72. Anyone distributing DC Circuit Analysis for any kind of remuneration must
  73. first contact Arthur Tanzella at the address above for authorization. This
  74. authorization will be automatically granted to distributors recognized by
  75. the Association of Shareware Professionals (ASP) as adhering to its
  76. guidelines for shareware distributors, and such distributors may begin
  77. offering DC Circuit Analysis immediately.  However, Arthur Tanzella must
  78. still be advised so that the distributor can be kept up-to-date with the
  79. latest version of the DC Circuit Analysis program.
  80.  
  81. You are encouraged to pass a copy of DC Circuit Analysis along to your
  82. friends for evaluation.  Please encourage them to register their copy if
  83. they plan to continue using it.  All registered users will receive a copy
  84. of the latest version of the DC Circuit Analysis program when they
  85. register.  If you have any comments or problems with this program, you can
  86. contact me at the address above or send an E-mail message via CompuServe to
  87. Arthur Tanzella 71175,76.  All registered users will receive support for a
  88. minimum of three months from the time they registered. ASP OMBUDSMAN
  89.  
  90. The author is a member of the Association of Shareware Professionals (ASP). 
  91. The ASP wants to make sure that the shareware principle works for you.  If
  92. you are unable to resolve a shareware-related problem with an ASP member by
  93. contacting the member directly, the ASP can probably help you.  The ASP
  94. Ombudsman can help you resolve a dispute or problem with an ASP member, but
  95. does not provide technical support for members' products.  Please write to
  96. the ASP Ombudsman at 545 Grover Road, Muskegon, MI 49442 or send an E-mail
  97. message via CompuServe to ASP Ombudsman 70007,3536.
  98.  
  99. GETTING STARTED
  100.  
  101. The DC Circuit Analysis program contains over 100 files occupying
  102. approximately 800 KB of disk space, and is compressed into a single self-
  103. extracting file called "INSTALL.EXE."  This file was created using the
  104. LHarc version 2.11 program, which is a copyright reserved freeware program
  105. written by Haruyasu Yoshizaki.
  106.  
  107. To run the program requires a 286 or later (386, 486, or Pentium)
  108. processor, an EGA or VGA graphics' adapter with 256 KB of RAM installed,
  109. and a color monitor.  It also requires between 300 KB and 350 KB of
  110. available RAM after DOS, drivers and Terminate and Stay Resident (TSR)
  111. program are loaded.  The actual amount of RAM required depends on the
  112. complexity of the circuit.  If Expanded Memory (EMS) is installed, only
  113. 300 KB of RAM is required.  You can use the CHKDSK or MEM command to decide
  114. if you have enough available RAM to run this program.
  115.  
  116. To start the DC Circuit Analysis you must be in the directory containing
  117. this program.  Typically, the program is stored in the C:\DC14 directory. 
  118. Use the DOS "CD" (Change Directory) command to change the default directory
  119. to the program directory as follows:
  120.  
  121.                 CD \DC14
  122.  
  123. To start the program type "DC"  with or without parameters as follows:
  124.  
  125.                 DC
  126.                    or
  127.                 DC filename.DC
  128.                    or
  129.                 DC filename.DC x
  130.  
  131. If no parameters are specified after the "DC" command, the first (help)
  132. screen of the online tutorial will be displayed.  This tutorial contains
  133. all the information in this document, and allows access in a Hyper-Text
  134. like fashion.  
  135.  
  136.         The cursor keys (or mouse) can be used to highlight keywords on the
  137.         screen.  
  138.  
  139.         The ENTER key will display another screen of information whose
  140.         subject corresponds to the selected keyword.  
  141.  
  142.         The PGDN key, or selecting the "More" keyword, will display the
  143.         next screen of information.  
  144.  
  145.         The PGUP key will display the previous screen.  
  146.  
  147.         The F1 key will display the first screen of the tutorial.  
  148.  
  149. From the first screen the "Table of Contents" keyword will display a screen
  150. containing the Table of Contents that will allow you to jump directly to
  151. the desired section.  
  152.  
  153. The "Index" keyword will display a screen containing many different
  154. keywords.  The ESC key will exit the Tutorial and return you to the DC
  155. Circuit Analysis program.  
  156.  
  157. The F5 key will allow you to return to the tutorial at the same screen
  158. previously displayed.
  159.  
  160. To return to the main menu, press the ESC key.  
  161.  
  162. Press ENTER to display the "Select Sample Circuit" screen.  
  163.  
  164. This screen contains three menus.  From left to right they are the
  165. Circuits, Directories, and Drives menus.  Each menu contains a sorted list
  166. of items.  
  167.  
  168.         You use the LEFT and RIGHT cursor keys to move from one menu to
  169.         another.  
  170.  
  171.         From within a menu you can use the UP and DOWN cursor keys to
  172.         highlight an item.  
  173.  
  174.         The PGUP and PGDN key will page through this directory. 
  175.         Alternatively, you can start to type out the entry to highlight the
  176.         desired item. 
  177.  
  178.         Use the ENTER key to select the highlighted item.
  179.  
  180. In the Directories (middle) menu, selecting the ".." item will move you up
  181. one directory in the tree.  Whenever you change the directory, the path
  182. displayed on the second line in blue will change along with the Circuits
  183. menu.  In the Drives menu, you should not select a floppy drive that does
  184. not contain a diskette.  Otherwise, DOS will display an "Abort, Retry, or
  185. Fail" menu.  
  186.  
  187. Finally, ESC will exit this menu without selecting a sample circuit.  At
  188. the opening menu you can select "Exit" to exit the program without
  189. modifying the sample circuit.
  190.  
  191. If a filename is specified on the command line, and it does not exist, the
  192. program will display the "Modify Circuit" screen that allows you to create
  193. a new circuit.  By convention, circuit files have the extension "DC."  
  194.  
  195. To exit this screen, press the ESC key.  When exiting from the opening
  196. menu, you can choose to Save the Circuit or Exit without saving the
  197. circuit.  If you choose to save the circuit, it will be stored in the file
  198. (filename.DC) specified on the command line when you started the program. 
  199. If a problem occurs during the writing of the file, you will be prompted to
  200. enter a new filename.
  201.  
  202. If the file specified on the command line already exist, the program will
  203. display the opening menu.  Your choices are:
  204.  
  205.                 Analyze Circuit
  206.                 Modify Circuit
  207.                 Select Sample Circuit
  208.                 Save Circuit As
  209.                 Save Circuit
  210.                 Exit
  211.  
  212. "Analyze Circuit" will evaluate the circuit, calculating, and displaying
  213. voltages at interconnect nodes.  It will also calculate and display the
  214. current and its direction across each resistor in the circuit.  Finally, it
  215. will decide if any components are overloaded.
  216.  
  217. If you want to analyze a circuit and exit without modifying the circuit,
  218. add any character following the filename on the command line as follows:
  219.  
  220.                 DC filename.DC x
  221.  
  222. Sample circuit files are located in the "DC" subdirectory under the default
  223. directory.  You must prefix sample filenames with "DC\" to use files in
  224. this subdirectory as follows:
  225.  
  226.                 DC DC\filename.DC x
  227.  
  228. As an example, let's look at the "RESIST1.DC" sample circuit.  Start the
  229. program by typing the following:
  230.  
  231.                 DC
  232.  
  233. Select "RESIST1.DC" from the select sample circuit menu.  This file
  234. actually contains three separate resistor circuits.  The simplest circuit
  235. is on the left, and the circuits gradually become more complex as you move
  236. to the right.  Notice that voltages at interconnect nodes are displayed in
  237. green, and currents across resistors are displayed in orange.  Further
  238. notice, that an arrow prefixes the current indicating the direction of the
  239. current, always pointing from a larger voltage to a smaller voltage.  The
  240. ESC or F10 key is used to exit. BASIC ELECTRICAL THEORY
  241.  
  242. Electrical potential is measured in Volts (V).  
  243. Electrical current is measured in Amperes or Amps (A).  
  244. Electrical resistance is measured in Ohms (Ω).  
  245. Electrical power is measured in Watts (W).
  246.  
  247. Conductors are usually metal wires made of copper or aluminum, and are used
  248. to conduct electricity.  These metals have a very small resistance measured
  249. in milliohms (0.001 ohms) per foot of wire, depending on the diameter of
  250. the wire.  The DC Circuit Analysis program assumes that wires used to
  251. connect components have zero resistance.  This assumption is valid if short
  252. distances (less than a few feet) are involved.
  253.  
  254. Insulators are usually made of materials like rubber and plastic, and are
  255. used to insulate wires.  Insulators have very high resistance (millions of
  256. ohms).
  257.  
  258. Resistors are components that allow electrical current to flow, but resist
  259. the current converting some of it into heat.  Resistors are typically made
  260. from carbon, and have resistance measured in ohms or Killohms (1,000 ohms).
  261.  
  262. A potentiometer is a variable resistor with three connection points.  The
  263. top and bottom connections are to a fixed resistor.  The middle connection
  264. can make contact at different locations along this resistor.  Hence, the
  265. sum of the resistance between the middle connection and the top connection,
  266. and the resistance between the middle connection and the bottom connection,
  267. is the same as the resistance between the top and the bottom connection.
  268.  
  269. Other basic electrical components include capacitors and inductors. 
  270. Capacitors are constructed of two large surface area conductors separated
  271. by a thin insulator.  Capacitors are typically used in an Alternating
  272. Current (AC) circuit to filter selective frequencies.  They can also be
  273. used to stabilize a DC voltage from voltage spikes. 
  274.  
  275. Inductors are wires wrapped into a coil.  When electrical current spirals
  276. through an inductor, it creates a magnetic field.  Inductors are primarily
  277. used in AC circuits to produce oscillators.  Inductors have the opposite
  278. effect of capacitors on a circuit.  Inductors can also be used to create
  279. electromagnets.  If two inductors are wrapped around the same iron core,
  280. they form a transformer.  Transformers are used to raise or lower AC
  281. voltages.
  282.  
  283. It is possible to create an electrical potential by passing an inductor
  284. through a magnetic field.  This is how an electrical generator works.  
  285.  
  286. Batteries are electrical devices that use chemicals to produce an
  287. electrical potential.  The battery has an excess of electrons (negatively
  288. charged) at its negative pole, and a shortage of electrons at its positive
  289. pole.
  290.  
  291. Both generators and batteries can be used to supply power to an electrical
  292. circuit.  This program represents the power supply using fixed voltage
  293. nodes established at +10V, +5V, 0V (ground), -5V, or -10V.
  294.  
  295. In a steady state DC circuit, capacitors act like an insulator, unless the
  296. DC voltage is more than the capacitor rated voltage.  Inductors on the
  297. other hand, act like wires or resistors with small resistance values. 
  298. Consequently, the DC Circuit Analysis program does not support capacitors,
  299. inductors or transformers.
  300.  
  301. This program assumes a steady state DC circuit and uses the following
  302. equation to calculate voltage and current through out the circuit:
  303.  
  304.                 V = I R
  305.  
  306. where:
  307.         V is the potential measured in Volts
  308.         I is the current measured in Amps
  309.         R is the resistance measured in Ohms
  310.  
  311. Every component in the circuit is reduced to its characteristic resistance,
  312. and the voltage potential across the component is calculated based on the
  313. current flow using this equation.
  314.  
  315. The actual equation implemented in DC Circuit Analysis is a derivation of
  316. V=IR for multiple resistors connected to the same node.  The assumption is
  317. that the total current entering a node is equal to the total current
  318. exiting that node (ΣI=0).   The following equation is used to calculate
  319. the voltage at each node:
  320.  
  321.                       N
  322.                       Σ Vi/Ri 
  323.                      i=0
  324.                 V = ──────────
  325.                       N
  326.                       Σ 1/Ri
  327.                      i=0
  328.  
  329. where:
  330.         V  is the calculated voltage at a specified node
  331.         N  is the number of resistors connected to that node
  332.         Ri is the resistance of each resistor
  333.         Vi is the voltage at the node on the other end of each resistor
  334.  
  335. A double precision matrix of simultaneous equations is used to calculate
  336. the voltage at each node.  The effective resistance of each semiconductor
  337. is calculated based on the voltage at each node.  The calculation is
  338. continually repeated until the voltage at each node converges (barely
  339. changes).  The convergence criterion used by the program varies with the
  340. speed of the computer.  The convergence criteria ranges from a stringent
  341. value of 1.0e-10 (0.0000000001) Volts for fast computers, to a relaxed
  342. value of 1.0e-8 (0.00000001) Volts for slow computers.  The more stringent
  343. the convergence criteria the longer this program may take to calculate
  344. voltage and current, and the more accurate the results are.  You can
  345. override the convergence value and explicitly set it external to the
  346. program using the DOS environmental variable "DC_DV" as follows:
  347.  
  348.                 SET DC_DV=1.0e-8
  349.  
  350. Electrical power is calculated using the following equation:
  351.  
  352.                 P = V I
  353.                   or
  354.                 P = I² R
  355.  
  356. where:
  357.         P  is the calculated power in Watts
  358.         V  is the potential across a component measured in Volts
  359.         I  is the current passing through the component measured in Amps
  360.         I² is the current squared (current multiplied by itself) in Amps²
  361.         R  is the resistance of the component measured in Ohms
  362.  
  363. Power is calculated to decide if various components are overloaded.  All
  364. resistors in the library are assumed to be standard ¼ Watt resistors.  As
  365. an example, using the equation I = V/R, a 100 ohm resistor connected to a
  366. 10 Volt source and ground has a current of 0.1 Amps passing through it. 
  367. Using the power equation P = VI, the power through this resistor is 1 Watt
  368. that exceeds its rated value of a ¼ Watt.  Therefore, this component
  369. (resistor) is overloaded.
  370.  
  371. USING THE PROGRAM
  372.  
  373. The DC Circuit Analysis program automatically detects and uses the
  374. following: a math coprocessor, a two or three button mouse, and EMS
  375. (Expanded) memory.  These items are not required, but if found, will
  376. improve the performance of the program.
  377.  
  378. DC Circuit Analysis supports a mouse if one is installed with either the
  379. MOUSE.SYS or MOUSE.COM driver.  However, a mouse is not required.  
  380.  
  381.         Tthe left mouse button is equivalent to the ENTER key and is used
  382.         to select items.  
  383.  
  384.         The right mouse button is equivalent to the ESC key and is used to
  385.         exit screens.  
  386.  
  387.         If the mouse has three buttons, the middle button is supported in
  388.         in the Modify Circuit screen to display the Library of Components
  389.         screen, and to switch pages of library components.
  390.  
  391. Let us now analyze the "RESIST2.DC" sample circuit.  This file contains two
  392. sample circuits, one with a potentiometer, and the other with a switch.  
  393.  
  394.         Use the LEFT and RIGHT cursor keys are used to select an adjustable
  395.         component.  
  396.  
  397.         Adjustable components with blue back grounds show they have been
  398.         selected.  
  399.  
  400.         A mouse can be used to select an adjustable component.  
  401.  
  402.         The ENTER key or the left mouse button will toggle the selected
  403.         switch, or increment the selected potentiometer in 10% increments.  
  404.  
  405. All switches are Single-Pole Double-Throw.  
  406.  
  407. When a switch is selected:
  408.  
  409.         The HOME, PGUP, and UP cursor keys will position the switch in the
  410.         up position.  
  411.  
  412.         The END, PGDN, and DOWN cursor keys will position the switch in the
  413.         down position.   
  414.  
  415. When a potentiometer is selected:
  416.  
  417.         The UP and DOWN cursor keys will increment or decrement the
  418.         potentiometer in 1% increments.  
  419.  
  420.         The PGUP and PGDN keys will increment or decrement the
  421.         potentiometer in 10% increments.  
  422.  
  423.         The HOME key sets the potentiometer to 99%, and the END key sets it
  424.         to 1%.
  425.  
  426.         The "p" key will plot a graph of the first eight interconnect node
  427.         voltages (labeled A through H in yellow) versus the potentiometer
  428.         voltage.  
  429.  
  430. The program will automatically calculate voltages at every node as it
  431. adjusts the potentiometer.  If you have a fast computer, the potentiometer
  432. will be adjusted in 1% increments from 1% to 99%.  Slower computers will
  433. use larger increments between 2% and 5%.  Since the program must
  434. continually calculate the circuit until it converges for each time the
  435. potentiometer is incremented, plots can take up to ten minutes, depending
  436. on the complexity of the circuit and the speed of the computer.  A math
  437. coprocessor can speed up the calculation, but is not required.  The DOS
  438. environmental variable "DC_PLOT" can be used to explicitly set the
  439. potentiometer increments external to the program as follows:
  440.  
  441.                 SET DC_PLOT=5
  442.  
  443. Once the program completes this calculation, the plot will be displayed on
  444. the screen.  
  445.  
  446.         Press any key to exit the plot and return to the analysis screen.  
  447.  
  448.         Subsequent "p" commands will instantly redisplay the plot without
  449.         recalculation.  Therefore, you can press "p" to toggle between the
  450.         plot and the analysis screen.  You can also adjust the
  451.         potentiometer on the analysis screen as you toggle between the two
  452.         screens.
  453.  
  454. Interconnect nodes, connected to fixed voltage or switches, are treated as
  455. though they are fixed nodes with the corresponding voltage, therefore the
  456. program does not explicitly display a voltage next to these nodes. 
  457. Interconnect nodes connected to other interconnect nodes are combined for
  458. calculational purposes into a single interconnect node and the calculated
  459. voltage is displayed only at the node created first.
  460.  
  461. Finally, the "w" key writes the Analysis or Plot screen into a PC
  462. Paintbrush compatible file called DC.PCX.  If the DOS environmental
  463. variable TMP is defined, the DC.PCX file will be written to the directory
  464. identified by the TMP variable, otherwise it will be written to the default
  465. directory.
  466.  
  467. Now let's exit (ESC) this sample circuit and look at modifying a circuit.  
  468.  
  469. Let's start with the existing circuit RESIST1.DC.  After selecting this
  470. circuit from the "Select Sample Circuit" menu, you should save it under a
  471. different name using the "Save Circuit As" menu.  To modify the circuit you
  472. should select "Modify Circuit" from the opening menu.
  473.  
  474. Now let's modify the first circuit on the left.  Let's change the 10V fixed
  475. voltage node to 5V fixed voltage node.  
  476.  
  477.         Use the cursor keys or the mouse to move the cursor over the 10V
  478.         fixed voltage icon.  
  479.  
  480.         Hold the CTRL key and the BACKSPACE key down simultaneously to
  481.         delete the 10V fixed voltage icon.  
  482.  
  483.         Now press F4, or the middle button on the mouse, to display the
  484.         library of components.  If you have a slow disk drive, it may take
  485.         a few seconds to display this screen, because it must read the
  486.         library file containing the icons.  A 256 KB disk cache, such as
  487.         SMARTDRV (see your MS-DOS manual), would speed up the display of
  488.         this screen.  
  489.  
  490.         Use the cursor keys or mouse to move the white box to the 5V fixed
  491.         voltage icon.  Press ENTER or the left mouse button to select this
  492.         icon.  The Modify Circuit screen will now reappear.  
  493.  
  494.         Use the cursor keys or mouse to move the icon to the same location
  495.         that the 10V fixed voltage icon was in. 
  496.  
  497.         Press ENTER or the left mouse button to lock it in place.  
  498.  
  499. Beware that if you attempt to locate the icon too close to an existing icon
  500. on the screen, you will get the message: 
  501.  
  502.                 "ERROR - Component Overlaps Another Component."
  503.  
  504. If this occurs, press any key to clear the message, move the icon to
  505. another location, and press ENTER or the left mouse button.  
  506.  
  507. Icons must have some space between them.  They cannot be touching.  Think
  508. of each icon as having an invisible rectangular outline that encompasses
  509. the icon.  
  510.  
  511. If you need to move an icon, locate the cursor on top of the icon and press
  512. the F3 key.  Then use the cursor keys or mouse to move the icon to a new
  513. location and press ENTER or the left mouse button to lock it in place.
  514.  
  515. We now must connect the 5V fixed voltage node to the top of the resistor. 
  516. Locate the cursor over the bottom circle (connection point) of the 5V fixed
  517. voltage node, and press ENTER or the left mouse button.  The icon will turn
  518. red.  Now locate the cursor over the top portion of the resistor and press
  519. ENTER or the left mouse button.  The program will draw a wire (line)
  520. between the two connection points.  You must always select a node
  521. (interconnect, fixed, or switch) before selecting a component (or IC) to
  522. make a connection.  You can use the same procedure to disconnect (remove) a
  523. wire.  You can connect two nodes together in any order.
  524.  
  525. You can press F1 for a brief help message.  For additional help, press F1 a
  526. second time to receive a full screen of help.  This screen identifies the
  527. different types of nodes and components in the library.
  528.  
  529. Finally, press F6 to analyze the circuit and see the results of your
  530. modification.  F6 allows you to switch between the "Analyze Circuit" and
  531. "Modify Circuit" screens.
  532.  
  533. Now is a good time for you to attempt to build your first circuit from
  534. scratch.  Exit the program and type the following:
  535.  
  536.                 DC DC\TEST2.DC
  537.  
  538. Now build a simple resistor circuit of your choosing.  Then go to analyze
  539. your circuit.
  540.  
  541. Let's look at the RESIST3.DC sample circuit for an example of a complex
  542. resistor network.
  543.  
  544. BASIC SEMICONDUCTOR THEORY
  545.  
  546. Besides resistors, there are electrical components called semiconductors. 
  547. They get their name from the fact that sometimes they act as a conductor, a
  548. resistor, or an insulator depending on the circumstance.  Semiconductors
  549. are typically made of materials like silicon or germanium.
  550.  
  551. There are two types of semiconductor materials, Positive type (P-type)
  552. material, and Negative type (N-type) material.  Typically, a semiconductor
  553. starts with a chemical group IV element (with four outer electrons), such
  554. as silicon.   This material must be formed into a nearly perfect crystal. 
  555. A small quantity of a group III element (with three outer electrons), such
  556. as boron, is added to create P-type material.  This material is positive
  557. because there is a slight shortage of electrons.  (Electrons are negative,
  558. so their absence makes the material positive).  Adding a small quantity of
  559. a group V element (with five outer electrons), such as phosphorus, creates
  560. N-type material.  Other elements can also be used to form semiconductors.
  561.  
  562.                              ┌─────┬─────┐
  563.                       (+) ───┤  P  │  N  ├─── (-)
  564.                              └─────┴─────┘
  565.  
  566. The simplest semiconductor is formed by joining P-type material and N-type
  567. material to form a P-N junction.  This class of semiconductors includes
  568. diodes and rectifiers.  The P-N junction is characterized by the fact that
  569. electrons can flow (forward) from the N-type material to the P-type
  570. material easier than (in reverse) from the P-type material to the N-type
  571. material.  There is a forward voltage required, called the threshold
  572. voltage, for the electrons to flow from the N-type to the P-type material. 
  573. A typical threshold voltage for a silicon diode is approximately 0.6 Volts. 
  574. For electrons to flow in the opposite direction usually requires a much
  575. higher voltage, (50 Volts or larger).
  576.  
  577. In reality, electrons travel from a negative source, containing an excess
  578. of electrons, to a positive source, containing a shortage of electrons.  By
  579. convention, electrical current is assumed to flow in the opposite
  580. direction, from a positive source to a negative source.  This convention
  581. was established long before the discovery of the electron.  
  582.  
  583. When a diode is reversed biased, the current remains constant until the
  584. voltage reaches the break down voltage.  At the break down voltage the
  585. current increases rapidly until the diode over heats destroying the diode. 
  586. When the diode is forward biased, the current increases exponentially until
  587. the voltage reaches the threshold voltage.  At the threshold voltage the
  588. diode will over heat destroying the diode.  The equation used to calculate
  589. the current in a P-N junction is as follows:
  590.  
  591.               I = Irev exp(K V)
  592.  
  593. where:
  594.        I     is the calculated current when the diode is forward biased
  595.        Irev  is the theoretical current when the diode is reversed biased
  596.        exp() is the exponential function "e" raised to the power of K V
  597.        K     is a constant approximately equal to 39 for silicon
  598.        V     is the forward biased voltage
  599.  
  600. A simple method for estimating the resistance of a forward biased diode, is
  601. to set the effective resistance of the diode in such a way to maintain a
  602. constant voltage drop across the diode equivalent to the threshold voltage. 
  603. Eventually, the diode will overload and burn out if too much current passes
  604. through it.
  605.  
  606. The symbol for a diode looks like a triangle pointing to a vertical line,
  607. as crudely represented below.  Conventional electrical current flows in the
  608. direction that the triangle points.
  609.  
  610.                              │\ │
  611.                       (+) ───┤ >├─── (-)
  612.                              │/ │
  613.  
  614.                              Diode
  615.  
  616. The DIODE1.DC and DIODE2.DC circuits illustrate the characteristics of a
  617. diode.  When plotting DIODE2.DC, the resulting curve is characteristic for
  618. the current increasing expedientially as the voltage across the diode
  619. approaches the threshold voltage.
  620.  
  621. This brings us to the next class of semiconductors, called transistors. 
  622. The name Transistor is derived from "Transient Resistor."  There are two
  623. types of transistors, NPN and PNP, which are constructed of three
  624. semiconductor materials sandwiched together.  The middle layer is called
  625. the "Base," and the outer two layers are called the "Emitter," and
  626. "Collector."  The thicknesses of each layer are not equal.  The Collector
  627. is the thickest layer, and the Base is the thinnest layer.
  628.  
  629.                             ┌───────┬─┬─────┐
  630.                Collector ───┤   N   │P│  N  ├─── Emitter
  631.                             └───────┴┬┴─────┘
  632.                                     Base
  633.  
  634.                             ┌───────┬─┬─────┐
  635.                Collector ───┤   P   │N│  P  ├─── Emitter
  636.                             └───────┴┬┴─────┘
  637.                                     Base
  638.  
  639. This class of transistor is called a "bipolar" transistor, because current
  640. flows through the transistor using two different methods.  In N-type
  641. material, current flows as electrons move through the material.  In P-type
  642. material, current flows as "holes" move through the material.
  643.  
  644. The symbol for a bipolar transistor is a three-prong icon as crudely
  645. represented below.  The prong with an arrow head is always the Emitter and
  646. it points in the direction the (conventional) current flows.  The Emitter
  647. in an NPN transistor points away from the Base, and the Emitter in a PNP
  648. transistor points toward the Base.
  649.  
  650.                 │ / Collector                   │  / Emitter
  651.                 │/                              │ /
  652.         Base ───┤\                      Base ───┤└
  653.                 │ \                             │\
  654.                 │  ┘ Emitter                    │ \ Collector
  655.  
  656.                NPN                             PNP
  657.  
  658. I will only discuss the NPN transistor.  The PNP transistor works
  659. identically, except that the direction of the current is reversed.  The
  660. Base-Emitter junction acts like a P-N junction diode, but with a slightly
  661. higher threshold voltage of approximately 0.7 Volts.  When the Base-Emitter
  662. junction is reversed biased (the Emitter voltage is larger than the Base
  663. voltage), the transistor is considered "Off," and very little current can
  664. flow through the transistor.  When the Base-Emitter junction is forward
  665. biased (the Base voltage is larger than the Emitter voltage), the
  666. resistance between the Collector and Emitter depends on the current flowing
  667. between the Base and Emitter.  The more current through the Base-Emitter
  668. junction, the smaller the resistance, and therefore the larger the current
  669. flowing between the Collector and Emitter.  The ratio of current flowing
  670. between the Collector and Emitter, and the current flowing between the Base
  671. and Emitter, is called the current gain designated "Hfe," and is typically
  672. about 100.  Therefore, bipolar transistors are current amplifiers.  The
  673. difference between the different bipolar transistors is primarily the
  674. amount of current they can handle before overloading.  Computer circuits
  675. are designed to be fast, not powerful.  
  676.  
  677. The resistance between the Base and the Emitter (Rbe) is calculated using
  678. the same method for calculating the resistance for a diode.  The resistance
  679. between the Collector and the Emitter (Rce) is calculated as follows:
  680.  
  681.               Rce = Rbe/Hfe
  682.  
  683. where:
  684.        Rce = calculated resistance between the Collector and the Emitter
  685.        Rbe = effective resistance between the Base and the Emitter
  686.        Hfe = current gain
  687.  
  688. The TRANNPN.DC and TRANPNP.DC sample circuits illustrate the
  689. characteristics of bipolar transistors.
  690.  
  691. A special type of transistor designed for high power and high gain (Hfe) is
  692. called a darlington.  It is essentially two bipolar transistors back to
  693. back on the same piece of silicon.  It is characterized by a threshold
  694. voltage that is typically twice that of a bipolar transistor and has an
  695. effective current gain (Hfe) about a 1,000 instead of a 100.  The
  696. TRANDNPN.DC and TRANDPNP.DC sample circuits illustrate the characteristics
  697. of darlingtons.  Note: when a darlington is turned On, there is a minimum
  698. voltage across the Collector and Emitter equivalent to the threshold
  699. voltage of a transistor (0.7 Volts).
  700.  
  701. A typical transistor in a computer circuit can only handle about 10
  702. milliamps (mA) of current.  A typical medium range transistor, like the
  703. 2N2222, can handle up to ½ Amp.  A typical power darlington, like the
  704. TIP100, can handle up to 8 Amps.
  705.  
  706.                  Gate                                Gate
  707.                   │                                   │
  708.             ┌─────┴─────┐                       ┌─────┴─────┐
  709.             │   metal   │                       │   metal   │
  710.             ├───────────┤                       ├───────────┤
  711.             │   glass   │                       │   glass   │
  712.             ├───┬───┬───┤                       ├───┬───┬───┤
  713.   Source ───┤ P │   │ P ├─── Drain    Source ───┤ N │   │ N ├─── Drain
  714.             ├───┘ N └───┤                       ├───┘ P └───┤
  715.             │           │                       │           │
  716.             └─────┬─────┘                       └─────┬─────┘
  717.                   │                                   │
  718.               Substrate                           Substrate
  719.  
  720.               P-Channel                           N-Channel
  721.  
  722. The last type of transistor to discuss is called the Metal Oxide
  723. Semiconductor (MOS).  It is a type of Field Effect Transistor (FET).  This
  724. transistor is similar to a bipolar transistor (NPN or PNP) with the
  725. addition of a metal "Gate" over the "Substrate."  The Gate is separated
  726. from the Substrate by a thin insulator, usually SiO2 (glass).  The symbols
  727. for these types of transistors are crudely represented below:
  728.  
  729.         Gate ──┐├─── Source                    │├─── Drain
  730.                │ ──> Substrate                 │ <── Substrate
  731.                │├─── Drain              Gate ──┘├─── Source
  732.   
  733.               PMOS                            NMOS
  734.  
  735. When a positive voltage of at least 2 Volts is applied between the Gate and
  736. a P-type Substrate, the electrons in the Substrate are pulled toward the
  737. Gate allowing current to flow between the two N-type materials called the
  738. "Source" and the "Drain."  This is called an N-channel MOS (NMOS)
  739. transistor.  The larger the voltage, the less resistance between the Source
  740. and the Drain.  The resistance is inversely proportional to the voltage
  741. (less the 2 Volt threshold voltage) squared as illustrated in the following
  742. equation:
  743.  
  744.                       K
  745.                 R = ──────
  746.                     (V-2)²
  747.  
  748. where:  R = The calculated resistance between the Source and the Drain
  749.         K = A constant, approximately 5,000 Ohms/Volt²
  750.         V = Voltage potential between the Gate and the Substrate.
  751.  
  752. A similar P-channel MOS (PMOS) transistor exists, but requires a negative
  753. voltage between the Gate and the N-type Substrate for current to flow
  754. between the P-type Source and Drain.  The TRANPMOS.DC and TRANNMOS.DC
  755. sample circuits illustrate the characteristics of MOS type transistors.
  756.  
  757. Unlike bipolar transistors that are current amplifiers, MOSFETs are voltage
  758. amplifiers.
  759. LOGIC
  760.  
  761. Before we can discuss actual computer circuits, we must first discuss the
  762. concept of logic.  There are only two logical values: "TRUE" and "FALSE." 
  763. There are three fundamental logical operators from which all other logical
  764. operators can be derived.  They are "NOT," "AND," and "OR."   The NOT
  765. operator works as follows:  If it is NOT TRUE, it must be FALSE. 
  766. Conversely, if it is NOT FALSE, it must be TRUE.  
  767.  
  768. All of the inputs must be TRUE for the AND operator to be TRUE.  Any of the
  769. inputs can be TRUE for the OR operator to be TRUE.  The following table
  770. summarizes these fundamental logical operators:
  771.  
  772.  
  773.                  ╔═══════════════╦═══════════════════════════╗
  774.                  ║     Input     ║          Output           ║
  775.                  ╟───────┬───────╫────────┬─────────┬────────╢
  776.                  ║   A   │   B   ║ NOT A  │ A AND B │ A OR B ║
  777.                  ╠═══════╪═══════╬════════╪═════════╪════════╣
  778.                  ║ FALSE │ FALSE ║ TRUE   │  FALSE  │  FALSE ║
  779.                  ║ FALSE │ TRUE  ║ TRUE   │  FALSE  │  TRUE  ║
  780.                  ║ TRUE  │ FALSE ║ FALSE  │  FALSE  │  TRUE  ║
  781.                  ║ TRUE  │ TRUE  ║ FALSE  │  TRUE   │  TRUE  ║
  782.                  ╚═══════╧═══════╩════════╧═════════╧════════╝
  783.  
  784. Besides the fundamental logical operators, there are three additional
  785. logical operators that are commonly used and can be derived from the three
  786. fundamental operators.  They are "NAND," "NOR," and Exclusive OR "XOR." 
  787. The NAND operators is the same as "NOT AND."  In other words, the result of
  788. the AND operator is complemented by the NOT operator.   The logical
  789. equation for the NAND operator is the following:
  790.  
  791.                 A NAND B = NOT (A AND B)
  792.  
  793. Similarly, the NOR operator is the same as "NOT OR."  The logical equation
  794. for the NOR operator is the following:
  795.  
  796.                 A NOR B = NOT (A OR B)
  797.  
  798. The Exclusive OR is similar to the OR operator, except only one input is
  799. allowed to be TRUE at a time for the answer to be TRUE.  In other words,
  800. the answer is TRUE if one or the other input is TRUE, but not both.  The
  801. logical equation for Exclusive OR (XOR) is the following:
  802.  
  803.                 A XOR B = (A OR B) AND NOT (A AND B)
  804.                                 or
  805.                 A XOR B = (A OR B) AND (A NAND B)
  806.  
  807. The following table summarizes the NAND, NOR, and XOR logical operators:
  808.  
  809.                ╔═══════════════╦═══════════════════════════════╗
  810.                ║     Input     ║             Output            ║
  811.                ╟───────┬───────╫───────────┬─────────┬─────────╢
  812.                ║   A   │   B   ║ A NAND B  │ A NOR B │ A XOR B ║
  813.                ╠═══════╪═══════╬═══════════╪═════════╪═════════╣
  814.                ║ FALSE │ FALSE ║   TRUE    │  TRUE   │  FALSE  ║
  815.                ║ FALSE │ TRUE  ║   TRUE    │  FALSE  │  TRUE   ║
  816.                ║ TRUE  │ FALSE ║   TRUE    │  FALSE  │  TRUE   ║
  817.                ║ TRUE  │ TRUE  ║   FALSE   │  FALSE  │  FALSE  ║
  818.                ╚═══════╧═══════╩═══════════╧═════════╧═════════╝
  819.  
  820. I will now discuss the DeMorgan's theorem.  This theorem states that if you
  821. invert the input and output of the AND operator, you obtain the same
  822. results as the OR operator.  Conversely, if you invert the input and output
  823. of the OR operator, you obtain the same results as the AND operator.  In
  824. addition, there are corollaries to this theorem.  The logical equations for
  825. this theorem and its corollaries are listed below:
  826.  
  827.                  A AND B = NOT ( (NOT A) OR (NOT B) )
  828.                  A AND B = (NOT A) NOR (NOT B)
  829.                   A OR B = NOT ( (NOT A) AND (NOT B) )
  830.                   A OR B = (NOT A) NAND (NOT B)
  831.                 A NAND B = (NOT A) OR (NOT B)
  832.                  A NOR B = (NOT A) AND (NOT B)
  833.  
  834. The DeMorgan's theorem can be extremely useful when designing logic
  835. circuits.
  836.  
  837. It is actually possible to derive the three fundamental logical operators,
  838. NOT, AND, and OR using a single logical operator, and subsequently derive
  839. all logical operators from this single logical operator.  (The original
  840. computer designers only had one or two logical operator circuits to work
  841. with).  This logical operator can be either an NAND or a NOR logical
  842. operator.  
  843.  
  844. The following logical equations illustrate this capability:
  845.  
  846.                    NOT A = A NAND A
  847.                  A AND B = NOT (A NAND B)
  848.                   A OR B = (NOT A) NAND (NOT B)
  849.                  A NOR B = NOT ( (NOT A) NAND (NOT B) )
  850.                  A XOR B = NOT ( ( (NOT A) NAND (NOT B) NAND (A NAND B) )
  851.  
  852.                    NOT A = A NOR A
  853.                  A AND B = (NOT A) NOR (NOT B)
  854.                   A OR B = NOT (A NOR B)
  855.                 A NAND B = NOT ( (NOT A) NAND (NOT B) )
  856.                  A XOR B = (A NOR B) NOR ( (NOT A) NOR (NOT B) )
  857.  
  858. How does this discussion on logic help explain how digital computers work? 
  859. A digital computer is a "Binary" computer.  Binary computers deal with only
  860. two states: TRUE or FALSE, 1 or 0, On or Off, Voltage or Ground.  Binary
  861. computers do not use varying voltages to represent values, instead they use
  862. simple On/Off circuits.  This means that binary computer circuits do not
  863. require precision electrical components.
  864.  
  865. The decimal numbering system we are familiar with uses ten different digits
  866. (0 through 9), and is called base 10.  A binary computer represents numbers
  867. using base 2, which only has two digits "0" and "1."  In base 10, the least
  868. significant (right most) digit is multiplied by 1, the next digit by 10,
  869. 100, 1000, etc.  In base 2, the least significant digit is multiplied by 1,
  870. the next by 2, 4, 8, etc.  So the decimal number 9 can be represented by
  871. the binary number 1001.  (A binary digit is called a bit.)
  872.  
  873. The Exclusive OR logical operator is the fundamental basis for a binary
  874. adder.  Once you have the ability to add two numbers together, you can than
  875. subtract two numbers by converting one number to its negative value and
  876. adding it to the other number.  Negative numbers are represented by using a
  877. method called "Twos Compliment."  This method represents a negative one by
  878. the largest possible number (all binary ones).  Therefore, when you add
  879. positive one and negative one you get zero (and carry out).  To convert a
  880. number to its negative value you must invert each digit using the NOT
  881. logical operator, and add one via carry in.  You can multiply two numbers
  882. by using a series of shifts and additions similar to long hand
  883. multiplication.  Finally you can divide two numbers by using a series of
  884. shifts and subtractions.
  885.  
  886. LOGIC GATES
  887.  
  888. We finally get to the good stuff.  It is time to start building circuits
  889. that can perform the various logical operations discussed above.  Circuits
  890. that perform logical operations are usually called "Logic Gates."  We will
  891. start with the simplest circuit using diodes.  
  892.  
  893. Using only diodes and resistors we can build the AND and OR logic gates. 
  894. The sample circuits DIODEAND.DC and DIODEOR.DC illustrate these logic
  895. gates.  In these circuits the switches are the inputs, where 5 Volts
  896. represents a TRUE value, and ground (0 Volts) represents a FALSE value.  
  897.  
  898. The DIODEAO.DC depicts a circuit with two ANDs and one OR logical operator
  899. that solve the following equation:
  900.  
  901.                 E = (A AND B) OR (C AND D)
  902.  
  903.                 where E is the output
  904.  
  905. This sample circuit illustrates some limitations to pure diode logic gates. 
  906. The first limitation is that the output voltage is not regenerated (reset
  907. to 0 or 5 Volts) after each logic gate, therefore the TRUE output of the
  908. AND gate can be as little as 2.8 Volts, instead of 5 Volts as illustrated
  909. in the previous example.  The reduced voltage is due to the Resistor-Diode-
  910. Resistor circuit between the input diodes and the output stage.  To make
  911. matters worse, the TRUE output of the OR gate can be as little as 2.2
  912. Volts.  The second limitation is that diode circuits cannot function as a
  913. logical NOT operator.
  914.  
  915. If we look back to the sample circuit of the NPN transistor (TRANNPN.DC),
  916. we see that a single transistor can function as a logical NOT operator. 
  917. When the input is 5 Volts the output is 0 Volts, and vice versa.
  918.  
  919. DTL
  920.  
  921. By combining the Diode AND circuit for input and the Transistor NOT circuit
  922. for output, we form the Diode-Transistor Logic (DTL) NAND gate, as depicted
  923. in the sample circuit DTLNAND.DC.  It was necessary to add a diode between
  924. the Diode AND circuit and the transistor because the threshold voltage of
  925. the transistor and the diode is almost the same.  This diode protects
  926. against false triggering of the transistor.  This circuit has the advantage
  927. that the output voltage of each gate is always regenerated, so there is no
  928. limit to how many gates can be connected in series. 
  929.  
  930. By removing one of the input diodes, the NAND gate now functions as a NOT
  931. gate (or Inverter).  The DTLNOT.DC sample circuit illustrates the NOT gate. 
  932. The PLTDTL.DC sample circuit allows you to vary the input voltage to see
  933. how this circuit responds.  If you use the "p" command, you can plot the
  934. voltage at each node as the input voltage varies from 0 Volts to 5 Volts. 
  935. When the input is approximately 0.5 Volts, the output of the logic gate
  936. will change.
  937.  
  938. The logic AND gate can be formed by combining the NAND gate with the NOT
  939. gate.  It is not necessary to use diodes in the internal NOT gate, when a
  940. single transistor will suffice.  The sample circuit DTLAND.DC illustrates
  941. this circuit.
  942.  
  943. The DTL OR gate does not use the Diode OR gate as an input stage.  If a
  944. Diode OR was used, current would be allowed to flow through the input stage
  945. into the remainder of the circuit.  The DTL NAND gate isolates the input
  946. current from the remainder of the circuit.  To provide the same isolation
  947. for the DTL OR gate, the OR gate is created using three NOT gates and an
  948. AND gate as defined by DeMorgan's theorem:
  949.  
  950.                 A OR B = NOT ( (NOT A) AND (NOT B) )
  951.  
  952. Two DTL NOT gates are used as an input stage, and the transistors'
  953. Collectors and Emitters are tied together to form an AND gate.  A third DTL
  954. NOT gate (a single transistor) is used for the output stage.  The final NOT
  955. gate is required to provide a consistent output voltage independent of
  956. whether one or both inputs are in the On position.  The sample circuit
  957. DTLOR.DC illustrates this circuit.
  958.  
  959. By adding another NOT gate to the output stage of the OR gate, we form the
  960. DTL NOR gate as illustrated in the DTLNOR.DC sample circuit.
  961.  
  962. Finally, the Exclusive OR (XOR) gate is illustrated in the DTLXOR.DC sample
  963. circuit, and uses the DTL AND, OR, and NAND gates to solve the Exclusive OR
  964. equation discussed earlier.  The traditional icons for the AND, OR, and
  965. NAND gates are used in this program.  If you press the F1 key twice, a full
  966. screen help message will appear identifying the icons used for logical
  967. gates.
  968.  
  969. TTL
  970.  
  971. This brings us to the next family of logic gates called Transistor-
  972. Transistor Logic (TTL).  The original TTL logic circuits used a multiple
  973. Emitter transistor for input, and a pair of transistors arranged one above
  974. the other for output.  The upper transistor is only On when the output is
  975. TRUE, and the lower transistor is only On when the output is FALSE.   This
  976. output configuration of transistors is called the "Totem-Pole" output.  The
  977. multiple Emitter transistor, which could only be manufactured in an
  978. Integrated Circuit (IC) chip, performs the same basic function as the Diode
  979. AND gate used in the DTL NAND gate.  Today's TTL circuits actually use
  980. diodes for their input stage, just like the DTL circuits.  Therefore, the
  981. sample TTL circuits in this program use diodes for input, instead of the
  982. multiple Emitter transistor.  However, the rest of the TTL circuit is
  983. characteristic of the original TTL circuits.
  984.  
  985. The sample circuits TTLNOT.DC, TTLNAND.DC, and TTLAND.DC depicts the TTL
  986. NOT, NAND and AND logic gates.  Notice that the TRUE output is not 5 Volts,
  987. but 4 Volts.  The PLTTTL.DC sample circuit is configured with a
  988. potentiometer for input and the voltage at each node can be plotted using
  989. the "p" option.
  990.  
  991. The sample circuits TTLOR.DC and TTLNOR.DC illustrate the TTL OR and NOR
  992. gates.  The input stage of these circuits is similar to the corresponding
  993. DTL input stages, and the output stage contains the standard TTL totem-pole
  994. output.
  995.  
  996. The Exclusive OR (XOR) gate is illustrated in the TTLXOR.DC sample circuit,
  997. and uses the TTL AND, OR, and NAND gates to solve the Exclusive OR equation
  998. discussed earlier.
  999.  
  1000. Besides the standard logic gates, TTL circuits offer a three-state gate
  1001. that can turn Off both transistors in the totem-pole output stage.  Three
  1002. state gates are typically used when the output of many gates is connected
  1003. together on a bus, and only one gate is allowed to be active at a time. 
  1004. The TTL3NOT.DC sample circuit is an example of a TTL three state gate.  The
  1005. top switch is connected to the data input.  Only when the bottom switch is
  1006. Off, will the output be enabled.
  1007.  
  1008. In general, TTL circuits are faster than DTL circuits.  Over the years
  1009. several variations of TTL circuits have evolved.  These variations include
  1010. Low-power (L), Schottky (S), Low-power Schottky (LS), and Advanced Low-
  1011. power Schottky (ALS or F) circuits.  Of these variations, the LS series is
  1012. the most commonly available since it is faster, cheaper, and requires less
  1013. power than the original TTL circuits.
  1014.  
  1015.                              ┌─────┬─────┐
  1016.                       (+) ───┤metal│  N  ├─── (-)
  1017.                              └─────┴─────┘
  1018.  
  1019. A "Schottky Diode" is a surface barrier diode composed of a metal (such as
  1020. gold) and  N-type material.  This diode is faster than a silicon diode and
  1021. has a threshold voltage about 0.3 Volts or half the threshold voltage of a
  1022. silicon diode.  The SKDIODE.DC sample circuit illustrates the operating
  1023. characteristics of a Schottky Diode.  The Schottky Diode symbol is crudely
  1024. depicted below:
  1025.                                 ┌┐
  1026.                              │\ │
  1027.                       (+) ───┤ >├─── (-)
  1028.                              │/ │
  1029.                                └┘
  1030.                         Schottky Diode
  1031.  
  1032. The Low-power Schottky (LS) series logic gate employs Schottky Diodes
  1033. between the Base and Collector junction of each transistor preventing the
  1034. transistor from fully saturating (fully turned On).  By not fully
  1035. saturating the transistor, it can switch from On to Off much faster.  These
  1036. transistors are called "Schottky Transistors" and are crudely depicted
  1037. below:
  1038.  
  1039.                 ┌┐                              ┌┐
  1040.                 │ / Collector                   │  / Emitter
  1041.                 │/                              │ /
  1042.         Base ───┤\                      Base ───┤└
  1043.                 │ \                             │\
  1044.                 │  ┘ Emitter                    │ \ Collector
  1045.                └┘                              └┘
  1046.  
  1047.                NPN                             PNP
  1048.  
  1049. The SCHOTTKY.DC sample circuit illustrates operating characteristics of the
  1050. Schottky transistor.  The input stage of the LS series gates uses Schottky
  1051. diodes instead of conventional diodes or multiple Emitter transistors.  The
  1052. LS series also uses Schottky diodes for negative input voltage protection. 
  1053. The LSNOT.DC sample circuit depicts a typical LS series NOT gate.  The
  1054. PLTLS.DC sample circuit is configured with a potentiometer for input and
  1055. the voltage at each node can be plotted using the "p" option.
  1056.  
  1057. The sample circuits LSNAND.DC and LSAND.DC depict the LS NAND and AND logic
  1058. gates.  Note that when an LS gate output is TRUE the output voltage is
  1059. approximately 4 Volts.  When an LS gate output is FALSE the output voltage
  1060. is approximately 0.3 Volts.
  1061.  
  1062. The sample circuits LSOR.DC and LSNOR.DC illustrate the LS OR and NOR
  1063. gates.  The LS XOR circuit is similar to the DTL and TTL XOR circuit,
  1064. except it uses LS gates.
  1065.  
  1066. In addition to the standard logic gates, LS circuits offer a three-state
  1067. gate that can turn Off both transistors in the totem-pole output stage. 
  1068. Three state gates are typically used when the output of many gates are
  1069. connected together on a bus, and only one gate is permitted to be active at
  1070. a time.  The LS3NOT.DC sample circuit is an example of a LS three state
  1071. gate.  The bottom switch is connected to the data input.  Only when the top
  1072. switch is On, will the output be enabled.  Note: the output may oscillate
  1073. in this program when the output is disabled.
  1074. ECL
  1075.  
  1076. The last family of logic gates that use bipolar transistors is called
  1077. Emitter-Coupled Logic (ECL).  ECL gates maintain a partial current in each
  1078. transistor preventing them from saturating or turning Off.  This makes ECL
  1079. gates the fastest logic gates on the market.  Also, the difference in
  1080. voltage between TRUE and FALSE, is approximately 1 Volt.  The typical ECL
  1081. circuit consists of a differential amplifier input stage, a bias circuit,
  1082. and an Emitter-follower output.  Traditional ECL circuits operate using
  1083. ground and -5.2 Volts for power supply.  However, they can operate at 5
  1084. Volts and ground like other logic gates.  All the sample circuits in this
  1085. program use the 5 Volts and ground power supply for ECL logic gates.
  1086.  
  1087. The basic ECL gate is an OR-NOR gate, which is characterized by a dual
  1088. complementary output.  The ECLORNOR.DC sample circuit illustrates this
  1089. logic gate.  You may notice that an input device labeled "ECL" is inserted
  1090. between the switch and the circuit input.  This device consists of three
  1091. resistors and is required to convert 5 Volts and ground from a switch to
  1092. input voltages that are compatible with ECL circuits.  If this circuit was
  1093. not installed, the ECL node voltages would not be characteristic of ECL
  1094. circuits.  
  1095.  
  1096. The ECLNOT.DC sample circuit illustrates the simplest of the ECL circuits,
  1097. with a single input and the traditional dual complementary outputs.  The
  1098. PLTECL.DC sample circuit, is the same NOT gate, but with a potentiometer
  1099. for input to illustrate the effects of varying the input voltage, on the
  1100. output voltage.
  1101.  
  1102. The ECL AND-NAND gate is derived using the OR-NOR gate as described by
  1103. DeMorgan's theorem:
  1104.  
  1105.                  A AND B = (NOT A) NOR (NOT B)
  1106.                 A NAND B = (NOT A) OR (NOT B)
  1107.  
  1108. The ECLNAND.DC sample circuit illustrates the ECL AND-NAND gate.  Both
  1109. input stages start with a switch, followed by a switch-to-ECL converter,
  1110. followed by an ECL NOT gate.  The outputs of the OR-NOR gate must be
  1111. reversed, since the NOR output (top) becomes the AND output, and the OR
  1112. output (bottom) becomes the NAND output.
  1113.  
  1114. The ECL Exclusive OR gate also has dual complementary outputs and is
  1115. constructed using only NOT and OR-NOR gates.  You must reverse the OR-NOR
  1116. gate outputs, since OR becomes NXOR, and NOR becomes XOR.  The sample
  1117. circuit ECLXOR.DC illustrates this circuit which can also be represented by
  1118. the logical equation:
  1119.  
  1120.                 A XOR B = (A NOR B) NOR ( (NOT A) OR (NOT B) )
  1121.  
  1122. Note: the ECLXOR.DC sample circuit uses 100 components.  This is the most
  1123. complex sample problem provided and will take the longest amount of time to
  1124. evaluate.
  1125.  
  1126. ECL gates are the fastest logic gates on the market, but they also require
  1127. the most power.  Hence, it is difficult to pack a lot of ECL gates on a
  1128. single integrated circuit chip without overheating the chip.
  1129.  
  1130. CMOS
  1131.  
  1132. The last family of logic gates I will discuss are called Complementary
  1133. Metal Oxide Semiconductors (CMOS).  The term complementary refers to the
  1134. use of two types of transistors in the output circuit in a configuration
  1135. similar to the totem-pole output in TTL.  The PMOS transistor is on top,
  1136. and the NMOS transistor is on the bottom.  The CMOSNOT.DC sample circuit
  1137. illustrates the NOT gate, which is the simplest of the CMOS gates.  The
  1138. PLTCMOS.DC sample circuits illustrates the effects of varying input voltage
  1139. on this gate.
  1140.  
  1141. CMOS circuits can operate using a wide variety of power supply voltages. 
  1142. Since the threshold voltage for the PMOS and NMOS transistors is 2 Volts,
  1143. the minimum power supply that CMOS circuits can use is approximately 3
  1144. Volts.  On the other hand, the power supply can be as large as 15 Volts. 
  1145. This makes battery driven circuits very practical, since the circuits will
  1146. continue to operate as the battery gradually runs down.
  1147.  
  1148. The CMOS NAND gate consists of four transistors, two PMOS transistors in
  1149. parallel, and two NMOS transistors in series, as illustrated by the
  1150. CMOSNAND.DC sample circuit.  Both NMOS transistors must be On for the
  1151. output to be FALSE (0 Volts).  The CMOS AND gate is the same circuit
  1152. followed by a CMOS NOT gate as illustrated in the CMOSAND.DC sample
  1153. circuit.
  1154.  
  1155. The CMOS NOR gate also consists of four transistors, however the two PMOS
  1156. transistors are in series, and the two NMOS transistors are in parallel, as
  1157. illustrated CMOSNOR.DC sample circuit.  Both PMOS transistors must be On
  1158. for the output to be TRUE (5 Volts).  The CMOS OR gate is the same circuit
  1159. followed by a CMOS NOT gate as illustrated in the CMOSOR.DC sample circuit.
  1160.  
  1161. The CMOS Exclusive OR gate is similar to the DTL and TTL Exclusive OR
  1162. gates, except it uses CMOS AND, NAND, and OR gates as illustrated in the
  1163. CMOSXOR.DC sample circuit.
  1164.  
  1165. CMOS gates are characterized by requiring very little power because the MOS
  1166. transistors use voltage to trigger, instead of current.  The same reason
  1167. that explains their low power consumption, also explains why CMOS gates are
  1168. the slowest logic gates (when the transistors are physically the same size
  1169. as the bipolar transistors in the previous logic families).  The speed of a
  1170. circuit is limited by the size and spacing of the components, and the speed
  1171. of light.  The speed of the electrons flowing through a circuit approaches
  1172. the speed of light, which is the theoretical speed limit.  However, today's
  1173. CMOS technology use very small transistors, with very thin insulators
  1174. between the Gate and Substrate of the transistor, and the Gates are now
  1175. made out of semiconductor material instead of aluminum metal.  Therefore
  1176. today's CMOS logic gates can be fast.  Because of their low power
  1177. consumption, they can be more densely packed on an integrated circuit chip. 
  1178. As an example, the Intel 486 processor is based on CMOS technology,
  1179. contains more than a million transistors on a single chip, and can operate
  1180. at speeds up to 66 MHz (million cycles/second).  The Intel Pentium
  1181. processor contains more than 3 million transistors and can operate at 3.3
  1182. Volts with speeds up to 100 MHz.
  1183.  
  1184. INTEGRATED CIRCUITS (IC)
  1185.  
  1186. After the invention of semiconductors, the next major invention was the
  1187. Integrated Circuit (IC) chip, which places multiple semiconductor
  1188. components on a single semiconductor wafer.  An entire circuit constructed
  1189. of resistors, capacitors, diodes, and transistors can be etched on to a
  1190. single chip.  All the components are made from semiconductor P-type and
  1191. N-type material, and are connected together with a metal conductor, like
  1192. aluminum.  
  1193.  
  1194. The resistor can be made of either P-type or N-type material.  By varying
  1195. the thickness of this material and by winding it back and forth in a small
  1196. area, different resistance values can be achieved.  
  1197.  
  1198. Diodes are formed by the junction of P-type and N-type material.  Schottky
  1199. diodes are formed by the junction of a metal like gold with N-type
  1200. material.  
  1201.  
  1202. Capacitors are typically reverse biased diodes, which are characterized by
  1203. small reverse biased voltages.  
  1204.  
  1205. NPN bipolar transistors are constructed by embedding N-type material for
  1206. both the Emitter and the Collector into a P-type Base.  (To make PNP
  1207. transistors, replace N-type with P-type and vice versa).  
  1208.  
  1209. CMOS transistors are similar to bipolar transistors, except there is a
  1210. metal or semiconductor (P-type or N-type) Gate over the Base of the
  1211. transistor separated by a thin insulator of SiO2 (glass).
  1212.  
  1213. The original ICs only contained a few components, possibly a single logic
  1214. gate.  As the technology improved, the components became smaller, and more
  1215. gates were placed on a single chip.  Eventually the ability to dissipate
  1216. the heat became the limiting factor.  Using today's CMOS technology, over a
  1217. million transistors can be placed on a single IC chip.
  1218.  
  1219. In the DC Circuit Analysis program, the term "Integrated Circuit" (IC)
  1220. takes on a slightly different meaning.  The DC Circuit Analysis library
  1221. contains both basic components (like resistors, diodes, and transistors)
  1222. and Integrated Circuits (like DTL NOT, TTL NAND, and CMOS NOR gates), which
  1223. are circuits created using the DC Circuit Analysis program, saved in a file
  1224. with a "DCL" extension, and referenced in the library.  The DC.DCL file
  1225. contains all the parameters and screen locations for each item in the
  1226. library.  (See the section below that describes this file format).  Each IC
  1227. is stored in a separate file.  
  1228.  
  1229. As an example, the DTL NOT gate is stored in the file DTLNOT.DCL located in
  1230. the DCL sub-directory.  You can view this circuit by changing to the DCL
  1231. subdirectory in the Select Sample Circuit menu.  From the Directories menu
  1232. select the ".." item to move up one directory, then select the "DCL" item
  1233. to display the library circuits.  From the Circuits menu select
  1234. "DTLNOT.DCL."
  1235.  
  1236. You will notice that there is no power supply, no switches for input, and
  1237. all the nodes are set to 0 Volts.  The first nodes created correspond to
  1238. the connection points.  By convention, the connections are in the following
  1239. order: power supply, ground, inputs, and outputs.  DCL files are not always
  1240. easy to read, since they use the fewest number of nodes necessary for the
  1241. library.  Nodes can be moved around on the screen, but if you delete one of
  1242. the connection nodes, you cannot simply recreate it.  Since the order in
  1243. which the nodes were created is essential to maintain compatibility with
  1244. the DC.DCL file.  Please do not modify the DCL library files.
  1245.  
  1246. USER DEFINED ICs
  1247.  
  1248. Why did I discuss DCL files?  
  1249.  
  1250. Because you can create your own circuits and add them to the library.  The
  1251. last eight icons in the library are reserved for your use.  They are stored
  1252. in the files DCL\U1.DCL through DCL\U8.DCL.  The connection nodes are
  1253. already created and organized on the screen in a pattern matching the icon
  1254. connection points.  All you have to do is add your circuits to these files. 
  1255. You can embed other Ics into your circuit, the only limitation is the 100
  1256. total components which includes the components within each IC and the IC
  1257. icon itself.  You can move the nodes around the screen, but please do not
  1258. delete them.  If you make a mistake in your user defined IC file, you can
  1259. start all over by copying the DCL\USER.DCL file into the file you were
  1260. working on.  This file provides a good starting point.  Please do not
  1261. modify the DCL\USER.DCL file.
  1262.  
  1263. MISCELLANEOUS EXAMPLES
  1264.  
  1265. Let's look at some miscellaneous examples.  Since my primary intention of
  1266. writing this program was to introduce you to computer circuits, I will
  1267. discuss some common computer circuits.  Due to the limitation of 100
  1268. components and the computer overhead to analyze complex circuits, I can
  1269. only discuss a few simple circuits.  To reduce the time required to analyze
  1270. these circuits, only CMOS technology will be used for these sample
  1271. circuits.
  1272.  
  1273. How does computer memory work?  
  1274.  
  1275. The basis for all computer memory is the Set-Reset (S-R) Latch, which
  1276. consists of two NAND gates that are cross connected.  The SRLATCH.DC sample
  1277. circuit illustrates the S-R Latch.  This circuit has two inputs and two
  1278. outputs.  The output of the top NAND gate is the normal output, and the
  1279. output of the bottom NAND gate is the complemented output.  The top switch
  1280. Sets the latch to TRUE, when it is in the Off position.  The bottom switch
  1281. Resets the latch to FALSE, when it is in the Off position.  When both
  1282. switches are in the On position, the circuit "remembers" what it was last
  1283. set to.  However, the initial output of this circuit is unknown and will
  1284. oscillate in this program until it is either Set or Reset using one of the
  1285. switches.  Both switches should not be in the Off position, since both
  1286. outputs (which are suppose to be opposites of each other) will both become
  1287. TRUE.
  1288.  
  1289. The Data Latch is an improvement on the Set-Reset Latch.  The DLATCH.DC
  1290. sample circuit illustrates the Data Latch.  This circuits consists of four
  1291. NAND gates, where the two NAND gates on the right form the familiar Set-
  1292. Reset Latch described above.  The top switch is the data input, and the
  1293. bottom switch is the enable input.  When the bottom switch is On, the input
  1294. data is stored in the latch.  When the bottom switch is Off, the input data
  1295. is ignored, and the circuit remembers its last setting.
  1296.  
  1297. The Data Flip-Flop is an example of a Master-Slave Flip-Flop.  It consists
  1298. of two latches connected in series and is illustrated in the FLIPFLOP.DC
  1299. sample circuit.  The first (Master) latch is a standard Data Latch as
  1300. described above.  The second (Slave) latch is a Set-Reset Latch with
  1301. enable.  When the enable input is On, the value of the Data input is stored
  1302. in the first latch.  When the enable input is Off, the value stored in the
  1303. first latch is transferred to the second latch.  Applications for Flip-
  1304. Flops include binary counters.  Initially, the output of the Flip-Flop is
  1305. unknown an will oscillate in this program until the lower switch changes.
  1306.  
  1307. The next set of circuits I will discuss are adders.  I will start with the
  1308. Half-Adder.  This circuits adds two binary numbers together and has two
  1309. outputs: Sum and Carry.  The Half-Adder is a variation on the Exclusive OR
  1310. circuit.  The HALFADDR.DC sample circuit illustrates the Half-Adder, as
  1311. described by the following logical equations:
  1312.  
  1313.                   Sum = A XOR B
  1314.                 Carry = A AND B
  1315.  
  1316. The truth table for a Half-Adder is as follows:
  1317.  
  1318.                              ╔═══════╦════════════╗
  1319.                              ║ Input ║   Output   ║
  1320.                              ╟───┬───╫─────┬──────╢
  1321.                              ║ A │ B ║ Sum │ Carry║
  1322.                              ╠═══╪═══╬═════╪══════╣
  1323.                              ║ 0 │ 0 ║  0  │   0  ║
  1324.                              ║ 0 │ 1 ║  1  │   0  ║
  1325.                              ║ 1 │ 0 ║  1  │   0  ║
  1326.                              ║ 1 │ 1 ║  0  │   1  ║
  1327.                              ╚═══╧═══╩═════╧══════╝
  1328.  
  1329. The Full-Adder is essentially two Half-Adders in series.  The Full-Adder
  1330. has three inputs: A, B, and Carry (C) from the previous least significant
  1331. digit.  It also has two outputs: Sum and Carry.  Full-Adders can be
  1332. connected in series to handle larger numbers.  The FULLADDR.DC sample
  1333. circuit illustrates a Full-Adder, as described by the following logical
  1334. equations:
  1335.  
  1336.                   Sum = (A XOR B) XOR C
  1337.                 Carry = (A AND B) OR (A AND C) OR (B AND C)
  1338.  
  1339. The truth table for a Full-Adder is as follows:
  1340.  
  1341.                            ╔═══════════╦════════════╗
  1342.                            ║   Input   ║   Output   ║
  1343.                            ╟───┬───┬───╫─────┬──────╢
  1344.                            ║ A │ B │ C ║ Sum │ Carry║
  1345.                            ╠═══╪═══╪═══╬═════╪══════╣
  1346.                            ║ 0 │ 0 │ 0 ║  0  │   0  ║
  1347.                            ║ 0 │ 0 │ 1 ║  1  │   0  ║
  1348.                            ║ 0 │ 1 │ 0 ║  1  │   0  ║
  1349.                            ║ 0 │ 1 │ 1 ║  0  │   1  ║
  1350.                            ║ 1 │ 0 │ 0 ║  1  │   0  ║
  1351.                            ║ 1 │ 0 │ 1 ║  0  │   1  ║
  1352.                            ║ 1 │ 1 │ 0 ║  0  │   1  ║
  1353.                            ║ 1 │ 1 │ 1 ║  1  │   1  ║
  1354.                            ╚═══╧═══╧═══╩═════╧══════╝
  1355.  
  1356. Due to limitations of this program, it is not practical to attempt to show
  1357. more complex logic circuits.  If you would like to learn more about
  1358. computer logic circuits, I recommend you invest in the "Logic Circuit
  1359. Analysis" program that I wrote.  It is cable of handling 1,000 logic gates,
  1360. which is enough to model an entire 4-bit Arithmetic Logic Unit (ALU).
  1361.  
  1362. Sometimes it is necessary to interface computer circuits to the outside
  1363. world.  The first circuit I will discuss is a Digital to Analog (D/A)
  1364. converter.  The simplest D/A consists of a resistor circuit.  The DTOA.DC
  1365. sample circuit is an example of a D/A.  The top switch is the most
  1366. significant digit and the bottom switch is the least significant digit.  If
  1367. you turn Off all the switches, and then turn only one switch On at a time,
  1368. you will notice that the top switch adds 2.5 Volts (½ the power supply
  1369. voltage), the second switch adds 1.25 Volts (¼ the power supply voltage),
  1370. the third switch 0.625 Volts, and the last switch 0.3125 Volts (or 1/16 the
  1371. power supply voltage).  This circuit can easily be interfaced with CMOS
  1372. logic gates, but not with the other family of logic gates.  That is because
  1373. CMOS logic is the only logic family with full 0 to 5 Volt output.
  1374.  
  1375. The next circuit is a CMOS Analog Switch.  The ANALOGSW.DC sample circuit
  1376. illustrates this circuit.  It uses a CMOS NOT circuit and a pair of MOS
  1377. transistors.  However, they are configured such that the switch can turn
  1378. both transistors On, or both Off.  When they are both On, they will provide
  1379. a small resistance allowing current to flow in either direction.  A typical
  1380. use of analog switches is to multiplex multiple analog signals into a
  1381. single Analog to Digital converter.
  1382.  
  1383. This brings us to Solid State Switches.  Sometimes it is necessary for a
  1384. digital circuit to control an electrical device, such as a light bulb, or a
  1385. motor.  The SSSW.DC and SSPOWSW.DC sample circuits illustrate solid state
  1386. switches capable of switching loads up to ½ Amp and 8 Amps respectively. 
  1387. The first circuit uses a 2N2222 transistor to switch up to a ½ Amp load,
  1388. and the second circuit adds a TIP100 power darlington to switch up to an 8
  1389. Amp load.  The 100 ohm resistor represents the load in both cases.  Higher
  1390. voltages can be controlled, but the resistor values must be changed and you
  1391. will have to use larger Wattage resistors.  (All resistors in this library
  1392. are only rated at ¼ Watts).  
  1393.  
  1394. The final sample circuit, SSRPOWSW.DC is a Solid State Reversible Power
  1395. Switch which uses four power transistors (two NPN and two PNP) for its
  1396. output.  This circuit can turn the load On and Off, as well as reverse the
  1397. power applied to the load.  The top switch is the On/Off switch, and the
  1398. bottom switch is the Forward/Reverse switch.  In this circuit each TTL AND
  1399. gate controls one 2N2222 transistor. The 2N2222 transistor controls both
  1400. the PNP power transistor and the NPN power transistor located in the
  1401. opposite corners.  The TTL logic assures that all four power transistors
  1402. are not turned On at the same time, but can all be turned Off.  The reverse
  1403. biased diodes are required to protect the power transistors when this
  1404. circuit is used to control a motor.  In addition, you should add a
  1405. capacitor across the motor.
  1406.  
  1407. I hope you enjoyed this tutorial and will continue to use this program to
  1408. explore other Direct Current (DC) circuits.  This program allows you to try
  1409. some circuits without actually building the circuit.
  1410.  
  1411. SPECIFICATIONS
  1412.  
  1413.         REQUIREMENTS
  1414.         ────────────
  1415.         IBM-PC or compatible computer with a 286 or later processor
  1416.         800 KB of disk space
  1417.         300 KB minimum available RAM, (after DOS, drivers and TSR)
  1418.         350 KB maximum available RAM required when there is no EMS
  1419.         EGA or VGA graphics adapter with 256 KB of RAM installed
  1420.         Color Monitor
  1421.  
  1422.         SUPPORTS (but not required)
  1423.         ───────────────────────────
  1424.         Mouse (2 or 3 button) with MOUSE.SYS or MOUSE.COM device driver.
  1425.         If a Math coprocessor installed, the program will run faster.
  1426.         If 64 KB of Expanded Memory (EMS) is available, it will be used.
  1427.  
  1428.         DOS ENVIRONMENTAL VARIABLES
  1429.         ───────────────────────────
  1430.         TMP     Sets location of DC.PCX and DC.DC file, otherwise written
  1431.                 to the default directory.
  1432.                 Example: SET TMP=D:\
  1433.  
  1434.         MONITOR Can be set to EGA or VGA.  The program will automatically
  1435.                 detect if an EGA or VGA adapter is installed.  The MONITOR
  1436.                 variable will override the automatic detection.
  1437.                 Example: SET MONITOR=EGA
  1438.  
  1439.         EMS     Can be set to OFF or NO to override auto-detection so not
  1440.                 to use EMS memory even if it is available.
  1441.                 Example: SET EMS=OFF
  1442.  
  1443.         DC_DV   Used to override the convergence criteria.  If it takes a
  1444.                 long time to display calculation results, you may want to
  1445.                 set this variable to 1.0e-8.  This may speed up the program
  1446.                 but reduce the accuracy of the results.  
  1447.                 Example: SET DC_DV=1.0e-8
  1448.  
  1449.         DC_PLOT Used to override the potentiometer increments used during
  1450.                 plotting.  This value may range from 1% to 5%.
  1451.                 Example: SET DC_PLOT=5
  1452.  
  1453.  
  1454.         PROGRAM LIMITS
  1455.         ──────────────
  1456.         112 Library Entries
  1457.         100 Components per circuit, including ICs and their components
  1458.         250 Nodes per circuit
  1459.         750 Connections per circuit
  1460.           8 User Definable Circuits
  1461.           8 Connection terminals per IC
  1462.           5 Connections per node.
  1463.  
  1464. SUMMARY OF KEYS
  1465.  
  1466.         TUTORIAL SCREEN
  1467.                 Cursor Keys - Highlight the desired keyword
  1468.                 ENTER - Select the highlighted keyword
  1469.                 PGDN - Display next screen
  1470.                 PGUP - Display previous screen
  1471.                 F1 - Display opening tutorial screen
  1472.                 ESC - Exit tutorial
  1473.  
  1474.         OPENING MENU
  1475.                 Cursor Keys - Highlight the desired item
  1476.                 HOME - Highlight "Analyze Circuit"
  1477.                 END - Highlight "Exit"
  1478.                 F5 - Display tutorial
  1479.                 ENTER - Select the highlighted item
  1480.  
  1481.         SELECT SAMPLE CIRCUIT MENU
  1482.                 PGUP, PGDN - Display additional pages of sample circuits
  1483.                 Cursor Keys - Highlight the desired sample circuit
  1484.                 HOME - Highlight the first sample circuit on this page
  1485.                 END - Highlight the last sample circuit on this page
  1486.                 ENTER - Select the highlighted sample circuit
  1487.                 ESC, F10 - Exit menu without selecting a sample circuit
  1488.  
  1489.         ANALYZE CIRCUIT
  1490.                 LEFT and RIGHT - Highlight Adjustable Component
  1491.                                  (Switch or Potentiometer)
  1492.                 Switch:
  1493.                         UP, PGUP, HOME - Set to up position
  1494.                         DOWN, PGDN, END - Set to down position
  1495.                         ENTER - Toggle Switch
  1496.                 Potentiometer:
  1497.                         HOME - Set to 99%
  1498.                         ENTER, PGUP - Increment by 10%
  1499.                         UP - Increment by 1%
  1500.                         DOWN - Decrement by 1%
  1501.                         PGDN - Decrement by 10%
  1502.                         END - Set to 1%
  1503.                 F5 - Display tutorial
  1504.                 F6 - Edit circuit
  1505.                 p - Plot node voltage vs. potentiometer voltage
  1506.                 w - Save screen into PC Paintbrush compatible file
  1507.                 F10, ESC - Exit 
  1508.  
  1509.         MODIFY CIRCUIT
  1510.                 F1 - Help (Second F1 for full screen help)
  1511.                 F2 - Redraw screen
  1512.                 F3 - Move a Component (Node or IC)
  1513.                 F4 - Access Library of Components 
  1514.                 F5 - Display tutorial
  1515.                 F6 - Analyze circuit
  1516.                 Cursor Keys - Move Cursor
  1517.                 CTRL-BACKSPACE - Delete Component (Node or IC)
  1518.                 ENTER - Make a Connection, or Lock Component in position
  1519.                 F10, ESC - Exit
  1520.  
  1521.         LIBRARY OF COMPONENTS
  1522.                 F1 - Help (Second F1 for full screen help)
  1523.                 Cursor Keys - Highlight Component (Node or IC)
  1524.                 PGUP, PGDN - Switch Pages of Library Components
  1525.                 ENTER - Select Component
  1526.                 F10, ESC - Exit
  1527.  
  1528. LIBRARY
  1529.  
  1530. The Library is based on the following components:
  1531. Resistors are standard values, ¼ Watts, 5% carbon resistors
  1532. Potentiometers are linear and are rated at 2 Watts
  1533. Silicon Diodes are 1N914 high speed switching Diodes (10 mA)
  1534. Schottky Diodes can carry up to 20 mA
  1535. NPN Transistors are 2N2222 500 mA, with Hfe = 150
  1536. PNP Transistors are 2N2904 500 mA, with Hfe = 150
  1537. NPN Darlingtons are TIP100 8 Amp, with Hfe = 2000
  1538. PNP Darlingtons are TIP105 8 Amp, with Hfe = 3000
  1539. PMOS and NMOS transistors are standard CMOS transistors
  1540. ICs are circuits created using the DC Circuit Analysis program and made
  1541. available in the library.
  1542.  
  1543. The Library contains the following items:
  1544.  
  1545. Type                    Description
  1546. ─────   ───────────────────────────────────────────────
  1547. INODE   Interconnect Node
  1548. VNODE   Fixed Voltage Node,   0 Volts (Ground)
  1549. VNODE   Fixed Voltage Node,   5 Volts
  1550. VNODE   Fixed Voltage Node,  -5 Volts
  1551. VNODE   Fixed Voltage Node,  10 Volts
  1552. VNODE   Fixed Voltage Node, -10 Volts
  1553. SNODE   Switch Node,          5 Volts and   0 Volts (Ground)
  1554. SNODE   Switch Node,         10 Volts and -10 Volts
  1555.  
  1556. R       Resistor,           100 Ohms, ¼ Watts
  1557. R       Resistor,           130 Ohms, ¼ Watts
  1558. R       Resistor,           240 Ohms, ¼ Watts
  1559. R       Resistor,           470 Ohms, ¼ Watts
  1560. R       Resistor,           750 Ohms, ¼ Watts
  1561. R       Resistor,         1,000 Ohms, ¼ Watts
  1562. R       Resistor,         1,600 Ohms, ¼ Watts
  1563. R       Resistor,         2,000 Ohms, ¼ Watts
  1564.  
  1565. R       Resistor,         3,000 Ohms, ¼ Watts
  1566. R       Resistor,         3,900 Ohms, ¼ Watts
  1567. R       Resistor,         4,700 Ohms, ¼ Watts
  1568. R       Resistor,            10 Kilohms, ¼ Watts
  1569. R       Resistor,            20 Kilohms, ¼ Watts
  1570. R       Resistor,            47 Kilohms, ¼ Watts
  1571. R       Resistor,           100 Kilohms, ¼ Watts
  1572. R       Resistor,         1,000 Kilohms, ¼ Watts
  1573.  
  1574. R       Resistor,           100 Ohms, ¼ Watts
  1575. R       Resistor,           130 Ohms, ¼ Watts
  1576. R       Resistor,           240 Ohms, ¼ Watts
  1577. R       Resistor,           470 Ohms, ¼ Watts
  1578. R       Resistor,           750 Ohms, ¼ Watts
  1579. R       Resistor,         1,000 Ohms, ¼ Watts
  1580. R       Resistor,         1,600 Ohms, ¼ Watts
  1581. R       Resistor,         2,000 Ohms, ¼ Watts
  1582.  
  1583. R       Resistor,         3,000 Ohms, ¼ Watts
  1584. R       Resistor,         3,900 Ohms, ¼ Watts
  1585. R       Resistor,         4,700 Ohms, ¼ Watts
  1586. R       Resistor,            10 Kilohms, ¼ Watts
  1587. R       Resistor,            20 Kilohms, ¼ Watts
  1588. R       Resistor,            47 Kilohms, ¼ Watts
  1589. R       Resistor,           100 Kilohms, ¼ Watts
  1590. R       Resistor,         1,000 Kilohms, ¼ Watts
  1591.  
  1592. POT     Potentiometer,       1 Kilohms, 2 Watts
  1593. POT     Potentiometer,      10 Kilohms, 2 Watts
  1594. DIODE   Switching Diode,  1N914 10 milliamps
  1595. DIODE   Switching Diode,  1N914 10 milliamps
  1596. DIODE   Switching Diode,  1N914 10 milliamps
  1597. DIODE   Switching Diode,  1N914 10 milliamps
  1598. PMOS    PMOS Transistor,  (CMOS) 10 milliamps
  1599. NMOS    NMOS Transistor,  (CMOS) 10 milliamps
  1600.  
  1601. NPN     NPN Transistor,   2N2222 500 milliamps, Hfe=150
  1602. NPN     NPN Transistor,   2N2222 500 milliamps, Hfe=150
  1603. PNP     PNP Transistor,   2N2904 500 milliamps, Hfe=150
  1604. PNP     PNP Transistor,   2N2904 500 milliamps, Hfe=150
  1605. IC      Integrated Circuit,    DNPNL.DCL,    NPN Darlington
  1606. IC      Integrated Circuit,    DNPNR.DCL,    NPN Darlington
  1607. IC      Integrated Circuit,    DPNPL.DCL,    PNP Darlington
  1608. IC      Integrated Circuit,    DPNPR.DCL,    PNP Darlington
  1609.  
  1610. IC      Integrated Circuit,    DTLNOT.DCL,   DTL Inverter (NOT)
  1611. IC      Integrated Circuit,    TTLNOT.DCL,   TTL Inverter (NOT)
  1612. IC      Integrated Circuit,    CMOSNOT.DCL,  CMOS Inverter (NOT)
  1613. IC      Integrated Circuit,    ECLNOT.DCL,   ECL Differential output
  1614. IC      Integrated Circuit,    ECL116.DCL,   ECL Differential input &
  1615. output
  1616. IC      Integrated Circuit,    ECLOR.DCL,    ECL 2-In OR/NOR
  1617. IC      Integrated Circuit,    ECLOR3.DCL,   ECL 3-In OR/NOR
  1618. IC      Integrated Circuit,    ECLAND.DCL,   ECL 2-In AND/NAND  
  1619.  
  1620. IC      Integrated Circuit,    DTLAND.DCL,   DTL 2-In AND
  1621. IC      Integrated Circuit,    DTLAND3.DCL,  DTL 3-In AND
  1622. IC      Integrated Circuit,    DTLOR.DCL,    DTL 2-In OR
  1623. IC      Integrated Circuit,    DTLOR3.DCL,   DTL 3-In OR
  1624. IC      Integrated Circuit,    DTLNAND.DCL,  DTL 2-In NAND
  1625. IC      Integrated Circuit,    DTLNAND3.DCL, DTL 3-In NAND
  1626. IC      Integrated Circuit,    DTLNOR.DCL,   DTL 2-In NOR
  1627. IC      Integrated Circuit,    DTLNOR3.DCL,  DTL 3-In NOR
  1628.  
  1629. IC      Integrated Circuit,    TTLAND.DCL,   TTL 2-In AND
  1630. IC      Integrated Circuit,    TTLAND3.DCL,  TTL 3-In AND
  1631. IC      Integrated Circuit,    TTLOR.DCL,    TTL 2-In OR
  1632. IC      Integrated Circuit,    TTLOR3.DCL,   TTL 3-In OR
  1633. IC      Integrated Circuit,    TTLNAND.DCL,  TTL 2-In NAND
  1634. IC      Integrated Circuit,    TTLNAND3.DCL, TTL 3-In NAND
  1635. IC      Integrated Circuit,    TTLNOR.DCL,   TTL 2-In OR
  1636. IC      Integrated Circuit,    TTLNOR3.DCL,  TTL 3-In NOR
  1637.  
  1638. IC      Integrated Circuit,    CMOSAND.DCL,  CMOS 2-In AND
  1639. IC      Integrated Circuit,    CMOSAND3.DCL, CMOS 3-In AND
  1640. IC      Integrated Circuit,    CMOSOR.DCL,   CMOS 2-In OR
  1641. IC      Integrated Circuit,    CMOSOR3.DCL,  CMOS 3-In OR
  1642. IC      Integrated Circuit,    CMOSNAND.DCL, CMOS 2-In NAND
  1643. IC      Integrated Circuit,    CMOSNND3.DCL, CMOS 3-In NAND
  1644. IC      Integrated Circuit,    CMOSNOR.DCL,  CMOS 2-In NOR
  1645. IC      Integrated Circuit,    CMOSNOR3.DCL, CMOS 3-In NOR
  1646.  
  1647. IC      Integrated Circuit,    DTLXOR.DCL,   DTL Exclusive OR
  1648. IC      Integrated Circuit,    TTLXOR.DCL.   TTL Exclusive OR
  1649. IC      Integrated Circuit,    CMOSXOR.DCL,  CMOS Exclusive OR
  1650. IC      Integrated Circuit,    ECLXOR.DCL,   ECL Exclusive OR/NOR
  1651. IC      Integrated Circuit,    ECLIN.DCL,    Switch to ECL Input
  1652. IC      Integrated Circuit,    DTOA.DCL,     Digital to Analog Converter
  1653. IC      Integrated Circuit,    SCHOTTKY.DCL, NPN Schottky Transistor
  1654. IC      Integrated Circuit,    SCHOTTKR.DCL, NPN Schottky Transistor
  1655.  
  1656. Diode   20 mA Schottky Diode
  1657. Diode   20 mA Schottky Diode
  1658. Diode   20 mA Schottky Diode
  1659. Diode   20 mA Schottky Diode
  1660. IC      Integrated Circuit,    User.DCL,     Reserved
  1661. IC      Integrated Circuit,    User.DCL,     Reserved
  1662. IC      Integrated Circuit,    User.DCL,     Reserved
  1663. IC      Integrated Circuit,    User.DCL,     Reserved
  1664.  
  1665. IC      Integrated Circuit,    U1.DCL,       User Defined IC
  1666. IC      Integrated Circuit,    U2.DCL,       User Defined IC
  1667. IC      Integrated Circuit,    U3.DCL,       User Defined IC
  1668. IC      Integrated Circuit,    U4.DCL,       User Defined IC
  1669. IC      Integrated Circuit,    U5.DCL,       User Defined IC
  1670. IC      Integrated Circuit,    U6.DCL,       User Defined IC
  1671. IC      Integrated Circuit,    U7.DCL,       User Defined IC
  1672. IC      Integrated Circuit,    U8.DCL,       User Defined IC
  1673.  
  1674. SAMPLE CIRCUITS
  1675.  
  1676. The following examples can be found in the \DC14\DC sub-directory:
  1677.  
  1678. Filename                        Description
  1679. ───────────     ───────────────────────────────────────────────
  1680. ANALOGSW.DC     CMOS Analog Switch
  1681. CMOSAND.DC      CMOS 2-In AND
  1682. CMOSNAND.DC     CMOS 2-In NAND
  1683. CMOSNOR.DC      CMOS 2-In NOR
  1684. CMOSNOT.DC      CMOS Inverter (NOT)
  1685. CMOSOR.DC       CMOS 2-In OR
  1686. CMOSXOR.DC      CMOS Exclusive OR
  1687. DIODE1.DC       Sample Diode Circuits
  1688. DIODE2.DC       Plot of Diode Circuit
  1689. DIODEAND.DC     2-In Diode AND
  1690. DIODEAO.DC      Two 2-In Diode AND, and One 2-In Diode OR
  1691. DIODEOR.DC      2-In Diode OR
  1692. DLATCH.DC       Data Latch
  1693. DTLAND.DC       DTL 2-In AND
  1694. DTLNAND.DC      DTL 2-In NAND
  1695. DTLNOR.DC       DTL 2-In NOR
  1696. DTLNOT.DC       DTL Inverter (NOT)
  1697. DTLOR.DC        DTL 2-In OR
  1698. DTLXOR.DC       DTL Exclusive OR
  1699. DTOA.DC         Digital to Analog Converter
  1700. ECLNAND.DC      ECL 2-In AND/NAND
  1701. ECLNOT.DC       ECL Driver with Differential Output
  1702. ECLORNOR.DC     ECL 2-In OR/NOR
  1703. ECLXOR.DC       ECL Exclusive OR
  1704. FLIPFLOP.DC     Data Flip-Flop
  1705. FULLADDR.DC     Full Adder
  1706. HALFADDR.DC     Half Adder
  1707. LS3NOT.DC       TTL Low-Power Schottky (LS) Three State Inverter
  1708. LSAND.DC        TTL Low-Power Schottky (LS) 2-In AND
  1709. LSNAND.DC       TTL Low-Power Schottky (LS) 2-In NAND
  1710. LSNOR.DC        TTL Low-Power Schottky (LS) 2-In NOR
  1711. LSNOT.DC        TTL Low-Power Schottky (LS) Inverter (NOT)
  1712. LSOR.DC         TTL Low-Power Schottky (LS) 2-In OR
  1713. PLTCMOS.DC      Plot of CMOS Inverter (NOT)
  1714. PLTDTL.DC       Plot of DTL Inverter (NOT)
  1715. PLTECL.DC       Plot of ECL Driver with Differential Output
  1716. PLTLS.DC        Plot of TTL Low-Power Schottky (LS) Inverter (NOT)
  1717. PLTTTL.DC       Plot of TTL Inverter (NOT)
  1718. RESIST1.DC      Sample Resistor Circuits
  1719. RESIST2.DC      Sample Potentiometer Circuit
  1720. RESIST3.DC      A very complex resistor network
  1721. SCHOTTKY.DC     NPN Schottky Transistor
  1722. SKDIODE.DC      Schottky Diode
  1723. SRLATCH.DC      Set-Reset Latch
  1724. SSPOWSW.DC      8 Amp Solid State Switch
  1725. SSRPOWSW.DC     8 Amp Reversible Solid State Switch
  1726. SSSW.DC         ½ Amp Solid State Switch
  1727. STEPPER.DC      Stepper Motor Driver Circuit
  1728. TRANDNPN.DC     NPN Darlington
  1729. TRANDPNP.DC     PNP Darlington
  1730. TRANNMOS.DC     NMOS Transistor
  1731. TRANNPN.DC      NPN Transistor
  1732. TRANPMOS.DC     PMOS Transistor
  1733. TRANPNP.DC      PNP Transistor
  1734. TTL3NOT.DC      TTL Three State Inverter
  1735. TTLAND.DC       TTL 2-In AND
  1736. TTLNAND.DC      TTL 2-In NAND
  1737. TTLNOR.DC       TTL 2-In NOR
  1738. TTLNOT.DC       TTL Inverter (NOT)
  1739. TTLOR.DC        TTL 2-In OR
  1740. TTLXOR.DC       TTL Exclusive OR
  1741.  
  1742. DC.DCL FILE FORMAT
  1743.  
  1744. DC.DCL contains the specifications for each library entry.  There is one
  1745. line for each entry as follows:
  1746.  
  1747. TYPE NL NC NP  --- Locations x y ---  --- Parameters ---
  1748.  
  1749. where TYPE is:
  1750.    INODE - Interconnection Node
  1751.    VNODE - Fixed Voltage Node
  1752.    SNODE - Switch Voltage Node
  1753.    R     - Resistor
  1754.    POT   - Potentiometer
  1755.    DIODE - DIODE
  1756.    PMOS  - P-channel CMOS transistor
  1757.    NMOS  - N-channel CMOS transistor
  1758.    NPN   - NPN bipolar transistor or darlington
  1759.    PNP   - PNP bipolar transistor or darlington
  1760.    IC    - Integrated Circuit - Stored in separate files
  1761.  
  1762. NL: Number of Locations
  1763. NC: Number of Connections must be less then or equal to NL
  1764. NP: Number of Parameters
  1765.  
  1766. --- Locations x y ---
  1767. Locations specified in x y pairs relative to upper left corner of icon. 
  1768. The first NC locations are the connections, any additional locations are
  1769. for Resistor current, Potentiometer % turns, or INODE Voltage labels.
  1770.  
  1771. --- Parameters --- 
  1772. The number and type of parameters depends on the TYPE as follows:
  1773.  
  1774. TYPE  NL NC NP           Locations                     Parameters        
  1775. ───── ── ── ──  ───────────────────────────   ───────────────────────────
  1776. INODE  2  1  0  connection, Voltage Label     none
  1777. VNODE  1  1  1  connection                    Fixed Voltage
  1778. SNODE  1  1  2  connection                    Up Voltage, Down Voltage 
  1779. R      3  2  2  First, Second, Amp Label      Resistance, Rated Wattage 
  1780. POT    4  3  2  Top, Bottom, Middle, % Label  Resistance, Rated Wattage 
  1781. DIODE  2  2  3  Plus, Negative                Vth, Amp, HiZ Resistance 
  1782. PMOS   4  4  4  Gate, Source, Base, Drain     Vth, Ohms/Volt², Amp, HiZ R
  1783. NMOS   4  4  4  Gate, Source, Base, Drain     Vth, Ohms/Volt², Amp, HiZ R
  1784. NPN    3  3  4  Emitter, Base, Collector      Vth, Hfe, Amp, HiZ R
  1785. PNP    3  3  4  Emitter, Base, Collector      Vth, Hfe, Amp, HiZ R
  1786. IC     ?  ? -1  +V, -V, Inputs, Outputs       dcl\filename.DCL
  1787.                 Up to Eight Connections
  1788.  
  1789. Integrated Circuits (ICs) files are stored in the \DC14\DCL sub-directory.
  1790. ICs are all predefined DC Circuits that contain Components or other ICs.
  1791.  
  1792. DC AND DCL FILE FORMATS
  1793.  
  1794. Files with the extension "DC" are sample circuit files located in the DC
  1795. sub-directory.  Files with the extension "DCL" are library (IC) circuit
  1796. files located in the DCL sub-directory.  Both files contains circuit
  1797. created by the DC Circuit Analysis program, and have the same format:
  1798.  
  1799. The first line contains two numbers as follows:
  1800.  
  1801. NC NN
  1802.         where   NC = Number of Components or ICs
  1803.                 NN = Number of Nodes (Interconnect, Fixed, or Switch)
  1804.  
  1805. The next NC lines contains the components, one per line as follows:
  1806.  
  1807. LIB ROW COL N N1 N2 ...
  1808.         where   LIB = Library entry (0-111)
  1809.                 ROW = Screen row location of icon (0-299)
  1810.                 COL = Screen column location of icon (0-79)
  1811.                 N   = Number of connection terminals
  1812.                 N1, N2, ... = Node corresponding to each connection
  1813.                         Nodes are numbered starting with 100
  1814.  
  1815. The next NN lines contains the nodes, one per line as follows:
  1816.  
  1817. LIB ROW COL N  C1 CC1  C2 CC2 
  1818.         where   LIB = Library entry (0-111)
  1819.                 ROW = Screen row location of icon (0-299)
  1820.                 COL = Screen column location of icon (0-79)
  1821.                 N   = Number of connections
  1822.                 C1, C2, ... = Component (0-99), or Node
  1823.                 CC1, CC2, ... = Connection on component or Node C1, C2, ...
  1824.  
  1825.